package com.liuya.safe.system.role.service;

import com.liuya.base.BaseService;
import com.liuya.common.exception.EntityExistException;
import com.liuya.safe.model.SafeRole;

import java.util.Collection;
import java.util.Locale;

public interface RoleManagerService extends BaseService<SafeRole>{

    public SafeRole addRole(SafeRole role);

    public void updateRole(SafeRole role) throws EntityExistException;

    public void deleteRole(String id);

    public SafeRole getRole(String id);

    public Collection getLikelyRoles(String name);

    public Collection getAllRoles();

    public void assignPrivileges(String roleId, Collection pvlgIds);

    public Collection getPrivileges(String roleId);

    public boolean hasPrivilege(String roleId, String pvlgId);

    public void deleteRolePrivilegeByPrivilege(String pvlgId);

    public void addReservedRole(Locale locale);
}
